package cn.wzvtc.demo.common.constant;


/**
 * 状态码枚举
 * @author Rex
 * @create 2021-06-01 15:15
 */
public enum CommonStatus {
  /**
   * 状态码-状态信息
   */
  SUCCESS(10000, "SUCCESS"),
  FAILED(10001, "FAILED"),
  SERVER_ERROR(10002, "服务器错误"),
  INSERT_ERROR(1003, "添加失败"),
  DELETE_ERROR(1004, "删除失败"),
  UPDATE_ERROR(1005, "更新失败"),
  SELECT_ERROR(1006, "查询失败"),
  ;

  /**
   * 状态码
   */
  Integer code;

  /**
   * 状态信息
   */
  String msg;

  CommonStatus(Integer code, String msg) {
    this.code = code;
    this.msg = msg;
  }

  public Integer getCode() {
    return code;
  }

  public void setCode(Integer code) {
    this.code = code;
  }

  public String getMsg() {
    return msg;
  }

  public void setMsg(String msg) {
    this.msg = msg;
  }
}
